Phenomenon: Recently, when using rollup to develop small JS plug-ins, an error was reported during packaging: error: ‘default’ is not exported by node_ modules/qs/lib/ index.js .
Reason: I use the QS package to format. After installing the QS dependency, I introduce the import QS from ‘QS’, but the package will report an error. Because QS is in the form of commonjs module, which is also mentioned in the official rollup document, as shown in the figure below, the rollup plugin commonjs plug-in should be introduced. Refer to the rollup plugin commonjs document https://github.com/rollup/rollup-plugin-commonjs
reference resources:
Rollup | resolve error report error: ‘__ moduleExports’ is not exported by xxxx
Rollup official document
Read More:
- Module build failed (from ./node_modules/babel-loader/lib/index.js) babel-loader
- [Solved] gitbook: node_modules\npm\node_modules\graceful-fs\polyfills.js:287
- Module build failed (from ./node_modules/postcss-loader/src/index.js):
- [Solved] This dependency was not found: * core-js/modules/es.error.cause.js in ./node_modules/@babel
- ERROR in ./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js!./src/css/spec
- After node.js is installed, use the instruction node version in vscode to show that it is not an external or internal instruction. The solution is as follows:
- NPM ERR! Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’
- Copy node causes NPM execution error: cannot find module ‘/ / lib / utils/ unsupported.js ‘
- Error: EPERM: operation not permitted, mkdir ‘D:\nodejs\node_modules\npm\node_cache\_npx‘
- After NPM run dev is running, the browser does not respond and reports an error in. / ~ / Babel loader / lib! / ~ / Vue loader / lib/ selector.js?type=script&in
- NPM can’t find D: //nodejs/node all of The solution of sudden_modules/NPM/bin/npm-cli.js
- Cannot find module ‘.. / lib / utils / unsupported. JS’ problem in installing node in centos7
- Error: EACCES: permission denied, access ‘/usr/local/lib/node_modules’ npm ERR! at Error (native)
- Attempted import error: ‘injectglobal’ is not exported from ‘styled components’
- Vue init webpack command error Vue cli / node_ modules/_ [email protected]@rimraf/rimraf.js :313
- Module build failed: Error: ENOENT: no such file or directory, scandir,‘node_modules\node-sass\vend’
- VUEJS Failed to execute ‘removeChild’ on ‘Node’: The node to be removed is not a child of
- Uncaught TypeError: Failed to execute ‘removeChild’ on ‘Node’: parameter 1 is not of type ‘Node’.
- The version number of robot JS running by electron does not match
- Solution to the incomplete display of the principle icon number exported by smartpdf in Ad