Open Rajan opened 4 years ago
Running npx template also has the same problem. The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths and do not contain invalid characters, received "../../../static/global.css". internal/modules/cjs/loader.js:979 throw err; ^
Error: Cann
I get the same error with Sapper.
I think it relates to this issue: https://github.com/egoist/rollup-plugin-postcss/issues/265
To fix this error, you need to correct the line in the file rollup-plugin-smelte.js (node_modules/smelte/)
module.exports = (config = {}) =>
postcss({
plugins: plugins(config),
extract: path.resolve(config.output || "static/global.css")
});
fix to
module.exports = (config = {}) =>
postcss({
plugins: plugins(config),
extract: "static/global.css"
});
Any news about this issue? I have problem with sapper
$ yarn dev
yarn run v1.22.4
warning package.json: No license field
$ sapper dev
(node:5924) UnhandledPromiseRejectionWarning: ReferenceError: production is not defined
at Object.<anonymous> (C:\Users\OneDrive\rollup.config.js:41:12)
at Module._compile (internal/modules/cjs/loader.js:1156:30)
at Object.require.extensions..js (C:\Users\OneDrive\node_modules\sapper\dist\core.js:881:12)
at Module.load (internal/modules/cjs/loader.js:1000:32)
at Function.Module._load (internal/modules/cjs/loader.js:899:14)
at Module.require (internal/modules/cjs/loader.js:1042:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Function.load_config (C:\Users\OneDrive\node_modules\sapper\dist\core.js:887:18)
at async Object.create_compilers (C:\Users\OneDrive\node_modules\sapper\dist\core.js:1118:18)
at async Watcher.init (C:\Users\OneDrive\node_modules\sapper\dist\dev.js:215:21)
(node:5924) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a prom
ise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#
cli_unhandled_rejections_mode). (rejection id: 1)
(node:5924) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-z
ero exit code.
Editing node_modules/smelte/rollup-plugin-smelte.js
did not work either
module.exports = (config = {}) =>
postcss({
plugins: plugins(config),
extract: "static/global.css"
});
[!] (plugin postcss) Error: The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths and do not contain invalid characters, received "../../../public/global.css". Error: The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths and do not contain invalid characters, received "../../../public/global.css". at error (/Users/rajanchandi/MEGA/airparty/node_modules/rollup/dist/shared/node-entry.js:5400:30) at Object.FileEmitter.emitFile (/Users/rajanchandi/MEGA/airparty/node_modules/rollup/dist/shared/node-entry.js:12705:24) at /Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:916:16 at Generator.next ()
at asyncGeneratorStep (/Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:19:24)
at _next (/Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:41:9)
at /Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:48:7
at new Promise ()
at /Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:37:12
at Object.generateBundle (/Users/rajanchandi/MEGA/airparty/node_modules/rollup-plugin-postcss/dist/index.js:929:9)