`Cannot find module 'raw.macro'` when upgrading from 0.4.2
See original GitHub issueHad no other changes to my code. Very simple file:
import raw from "raw.macro";
const privacyPolicy = raw("./privacy_policy.md");
Works on 0.4.2 but not on 0.6.1.
babel-plugin-macros
is at version 3.1.0.
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top Results From Across the Web
raw.macro - npm
Read file contents at build time, similar to webpack raw-loader. ... Start using raw.macro in your project by running `npm i raw.macro`.
Read more >Stopped working in Node 12 · Issue #19 · pveyes/raw.macro
nvm use 12 Now using node v12.1.0 (npm v6.9.0) $ npx babel src Error: raw.macro: Cannot find module './stuff.txt' Require stack: ...
Read more >"Cannot find module" when using raw-loader and TypeScript
In my case with Next.js (also Typescript), I solved it by just installing raw-loader. Really. npm install raw-loader.
Read more >npmsearchfullcat_npm143.txt - GitHub
=shiwano 2013-11-20 0.1.3 2ch 2co Module that will provide nodejs adapters ... Install this and see if you want to hire me :)...
Read more >npm fails to install - Google Groups
n\nYou find elements by using a sub-set of WebDriver\'s element-finding strategies. ... 45 silly lockFile 71f07e56-sr-local-lib-node-modules-appium ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@pveyes it seems to be broken again with 0.7.0.
npm i --save-dev raw.macro
will refuse installation:If I retry with
npm install --save-dev --legacy-peer-deps raw.macro
, npm doesn’t complain anymore, but the package will not be found on application start (as described in the initial issue). But it will be listed in mypackage.json
with"^0.7.0"
and exists innode_modules
in version0.7.0
.However, I can make it work by running
npm i --save-dev --legacy-peer-deps raw.macro@0.6.2
My env:
Awesome
If it still doesn’t work for some of you, please reopen this issue and share your env version